{% extends 'blog/base.html' %}

{% block title %}
登录
{% endblock %}

{% block content %}
<div class="container">
    <div class="row justify-content-center">
        <div class="card mt-3 px-0 col-md-6">
            <div class="card-body">
                <form method="post">
                    {% csrf_token %}
                    <!-- 用户名 -->
                    <div>
                        {{ form.login.label_tag }}
                        <input type="text" name="{{ form.login.name }}" id="{{ form.login.auto_id }}" class="form-control">
                    </div>

                    <!-- 密码 -->
                    <div>
                        {{ form.password.label_tag }}
                        <input type="password" name="{{ form.password.name }}" id="{{ form.password.auto_id }}" class="form-control">
                    </div>

                    <!-- 提交按钮 -->
                    <button class="btn btn-primary" type="submit">登录</button>
                    <a class="btn btn-secondary" href="#" onclick="history.back(); return false;">取消</a>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}

